// class Film {
//     sortId: string;
//     filmId: string;
//     filmName: string;
//     filmYear: string;
//     filmTypes: string;
//     filmDesc: string;
//     filmImg: string;
//     castNames: string;
//     castList: string;
//     typeId: string;
//     source: string;
//     count: string;

//     constructor(
//         sortId?: string,
//         filmId?: string,
//         filmName?: string,
//         filmYear?: string,
//         filmTypes?: string,
//         filmDesc?: string,
//         filmImg?: string,
//         castNames?: string,
//         castList?: string,
//         typeId?: string,
//         source?: string,
//         count?: string
//     ){
//         this.sortId=sortId;
//         this.filmId=filmId;
//         this.filmName=filmName;
//         this.filmYear=filmYear;
//         this.filmTypes=filmTypes;
//         this.filmDesc=filmDesc;
//         this.filmImg=filmImg;
//         this.castNames=castNames;
//         this.castList=castList;
//         this.typeId=typeId;
//         this.source=source;
//         this.count=count;
//     }
// }

class Film {
    constructor(
        public sortId?: string,
        public filmId?: string,
        public filmName?: string,
        public filmYear?: string,
        public filmTypes?: string,
        public filmDesc?: string,
        public filmImg?: string,
        public castNames?: string,
        public castList?: string,
        public typeId?: string,
        public source?: string,
        public count?: string
    ){}
}

var f:Film  =  null;
f = {
    "sortId": "6",
    "filmId": "26630714",
    "filmName": "精灵旅社3：疯狂假期",
    "filmYear": "2018",
    "filmTypes": "喜剧/动画/奇幻",
    "filmDesc": "德古拉和家人朋友们踏上了一艘邮轮，宿命之敌“吸血鬼猎人”范海辛正在船上布置天罗地网等待“猎物”上门。除了爆笑搞怪，这次的冒险更加惊险刺激而纠结，因为在茫茫大海中，德古拉除了要面对重重家庭阻力、拯救朋友们的压力、也许还有......一个美女?",
    "filmImg": "https://img3.doubanio.com/view/photo/s_ratio_poster/public/p2530591543.jpg",
    "castNames": "格恩迪·塔塔科夫斯基(导演)/亚当·桑德勒/凯瑟琳·哈恩/史蒂夫·布西密/赛琳娜·戈麦斯",
    "castList": "[{\"name\":\"格恩迪·塔塔科夫斯基\",\"photo\":\"https://img3.doubanio.com/view/celebrity/s_ratio_celebrity/public/p24281.jpg\"},{\"name\":\"亚当·桑德勒\",\"photo\":\"https://img1.doubanio.com/view/celebrity/s_ratio_celebrity/public/p28807.jpg\"},{\"name\":\"凯瑟琳·哈恩\",\"photo\":\"https://img3.doubanio.com/view/celebrity/s_ratio_celebrity/public/p36102.jpg\"},{\"name\":\"史蒂夫·布西密\",\"photo\":\"https://img3.doubanio.com/view/celebrity/s_ratio_celebrity/public/p1091.jpg\"},{\"name\":\"赛琳娜·戈麦斯\",\"photo\":\"https://img3.doubanio.com/view/celebrity/s_ratio_celebrity/public/p256.jpg\"}]",
    "typeId": "10001",
    "source": "3.75",
    "count": "4"
}
console.log(f.castList);

var f1:Film = new Film();
f1.castList = "";
f1.filmName = "";
// ……

var f2:Film = new Film("1","20001");